package com.ytc.restcontroller;

import com.ytc.mapper.BooklistMapper;
import com.ytc.model.Booklist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RankingServiceImpl {
    @Autowired
    private BooklistMapper booklistMapper;

    /**
     * 高媛：查询所有类型为女生的书籍字数
     */
    @RequestMapping("countAllNumByGirl")
    public List<Booklist> countAllNumByGirl(){
        return booklistMapper.countAllNumByGirl();
    }

    /**
     * 高媛：查询所有类型为男生的书籍字数
     * @return
     */
    @RequestMapping("countAllNumByBoy")
    public List<Booklist> countAllNumByBoy(){
        return booklistMapper.countAllNumByBoy();
    }
    /**
     * 高媛：查询所有女生完结类型书籍的信息并根据点击量排序
     * @return
     */
    @RequestMapping("queryBookOrderByGirlEnd")
    public List<Booklist> queryBookOrderByGirlEnd(){
        return booklistMapper.queryBookOrderByGirlEnd();
    }
    /**
     * 高媛：查询所有男生完结类型书籍的信息并根据点击量排序
     * @return
     */
    @RequestMapping("queryBookOrderByBoyEnd")
    public List<Booklist> queryBookOrderByBoyEnd(){
        return booklistMapper.queryBookOrderByBoyEnd();
    }
    /**
     * 高媛：女生收藏榜
     */
    @RequestMapping("girlBookCollect")
    public List<Booklist> girlBookCollect(){
        return booklistMapper.girlBookCollect();
    }
    /**
     * 高媛：男生收藏榜
     */
    @RequestMapping("boyBookCollect")
    public List<Booklist> boyBookCollect(){
        return booklistMapper.boyBookCollect();
    }
    /**
     * 高媛：女生新书热度榜
     */
    @RequestMapping("girlBookNew")
    public List<Booklist> girlBookNew(){
        return booklistMapper.girlBookNew();
    }
    /**
     * 高媛：男生新书热度榜
     */
    @RequestMapping("boyBookNew")
    public List<Booklist> boyBookNew(){
        return booklistMapper.boyBookNew();
    }
    /**
     * 高媛：查询7天内类型为女生书籍的更新字数
     */
    @RequestMapping("countBookUpdateNumByGirl")
    public List<Booklist> countBookUpdateNumByGirl(){
        return booklistMapper.countBookUpdateNumByGirl();
    }
    /**
     * 高媛：查询7天内类型为女生书籍更新的信息
     */
    @RequestMapping("girlBookUpdateCount")
    public List<Booklist> girlBookUpdateCount(){
        return booklistMapper.girlBookUpdateCount();
    }
    /**
     * 高媛：查询7天内类型为男生书籍更新的信息
     */
    @RequestMapping("boyBookUpdateCount")
    public List<Booklist> boyBookUpdateCount(){
        return booklistMapper.boyBookUpdateCount();
    }
    /**
     * 高媛：查询7天内类型为男生书籍的更新字数
     */
    @RequestMapping("countBookUpdateNumByBoy")
    public List<Booklist> countBookUpdateNumByBoy(){
        return booklistMapper.countBookUpdateNumByBoy();
    }
}
